package com.thunisoft.incremental.common.util;

import java.util.UUID;

import lombok.experimental.UtilityClass;

/**
 * DataBaseUtil
 *
 * @author Zhang Xin
 * @version v1.0
 * @since 2020/3/27 16:22
 */
@UtilityClass
public class DataBaseUtil {

    public static final String PERCENT_SIGN = "%";

    public String contain(String content){
        String like = content;
        if (content.contains(PERCENT_SIGN)) {
            like = content.replaceAll("\\%","\\\\%");
        }
        return PERCENT_SIGN + like + PERCENT_SIGN;
    }

    public String uuid(){
        return UUID.randomUUID().toString().replaceAll("-","");
    }

}
